export function addRoutes(firstmenu) {
  if (firstmenu.children && firstmenu.children.length > 0) {
    return firstmenu.children.reduce((prev, v) => {
      prev.push({
        name: v.name,
        path: v.url.replace("/main/", ""),
        component: () => import(`@/views${v.url}/index.vue`)
      })
      return prev
    }, [])
  }
}
